package com.ruoyi.ucar.service;

import java.io.IOException;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.ucar.boreq.*;
import com.ruoyi.ucar.boresp.*;
import com.ruoyi.ucar.domain.TBrandPrice;
import com.ruoyi.ucar.domain.TCustomer;
import com.ruoyi.ucar.domain.TOrder;
import com.ruoyi.ucar.voreq.OrderGetReturnMoneyVoReq;
import com.ruoyi.ucar.voreq.TotalCountVoReq;
import com.ruoyi.ucar.voresp.OrderTotalCountDataVoResq;
import com.ruoyi.ucar.voresp.ProductTotalCountDataVoResq;

/**
 * 订单主Service接口
 * 
 * @author sungangbin
 * @date 2025-05-13
 */
public interface ITOrderService extends IService<TOrder>
{

    public OrderGetReturnMoneyBoResp getReturnMoney(OrderGetReturnMoneyVoReq orderGetReturnMoneyVoReq);
    /**
     * 查询订单主
     * 
     * @param id 订单主主键
     * @return 订单主
     */
    public TOrder selectTOrderById(Long id);

    /**
     * 查询订单主列表
     * 
     * @param tOrder 订单主
     * @return 订单主集合
     */
    public List<TOrder> selectTOrderList(TOrder tOrder);

    /**
     * 新增订单主
     * 
     * @param tOrder 订单主
     * @return 结果
     */
    public int insertTOrder(TOrder tOrder);

    /**
     * 修改订单主
     * 
     * @param tOrder 订单主
     * @return 结果
     */
    public int updateTOrder(TOrder tOrder);

    /**
     * 批量删除订单主
     * 
     * @param ids 需要删除的订单主主键集合
     * @return 结果
     */
    public int deleteTOrderByIds(Long[] ids);

    /**
     * 删除订单主信息
     * 
     * @param id 订单主主键
     * @return 结果
     */
    public int deleteTOrderById(Long id);


    /**
     * 初始化订单
     * @param ucarOrderBoReq
     * @return
     */
    public UcarOrderBoResp initOrder(UcarOrderBoReq ucarOrderBoReq) throws IOException;

    public int  updateOrderStatus(UcarOrderUpdateStatusBoReq ucarOrderUpdateStatusBoReq, TCustomer tCustomer);

    public int updateOrderTransactionId(UcarOrderUpdateTransactionIdBoReq ucarOrderUpdateTransactionIdBoReq);
    public OrderSignBoResq judgeOrderSign(OrderSignQueryBoReq orderSignQueryBoReq);

    public List<UcarOrderQueryApiBoResq> orderUseUcarQueryApi(UcarOrderQueryApiBoReq ucarOrdeQueryApiBoReq,TOrder order);
    public OrderMobileQueryListBoResp mobileQueryOrderByCond(OrderMobileQueryListBoReq orderMobileQueryListBoReq);
    public OrderQueryListBoResp queryOrderListByCond(OrderListQueryBoReq orderListQueryBoReq);

    UcarOrderCommitReportBoResq orderCommitReport(UcarOrderCommitReportBoReq ucarOrderCommitReportBoReq,TOrder order);

    OrderDetailQueryBoResp orderDetailQuery(OrderDetailQueryBoReq orderDetailQueryBoReq);

    public  String uploadOrderSign(UploadOrderSignBoReq uploadOrderSignBoReq) throws IOException;

    public int deleteTOrderById(String orderUuid, Long id);

    public int batchDelete(String[] orderUuids, Long[] ids);

    public TOrder selectOrderByOrderUuid(String orderUuid);

    public OrderDetailQueryBoResp orderDetailQuery2(OrderDetailQueryBoReq orderDetailQueryBoReq);
    public   List<TBrandPrice> getBrandPriceCache(String productType);
    public int reportUnReadMinusOne(ReportUnReadMinusOneBoReq reportUnReadMinusOneBoReq);

    public OrderTotalCountDataVoResq orderTotalCount( TotalCountVoReq totalCountVoReq);

    public ProductTotalCountDataVoResq  productTotalCount( TotalCountVoReq totalCountVoReq);


    public OrderQueryProxyListBoResp proxyQueryOrderByCond(OrderListProxyQueryBoReq orderListProxyQueryBoReq);


    public CheXinMengUrlListBoResp cheXinMenUrlList(CheXinMengUrlListQueryBoReq cheXinMengUrlListQueryBoReq);
}
